Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: customize vcs comment command --executable-name #2805

Merged
merged 1 commit into from
Dec 17, 2022

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Dec 16, 2022

what

  • Add --executable-name otherwise server configuration
    • This configuration changes vcs comment command trigger from atlantis plan to otherwise plan.

why

  • I want to customize atlantis plan command into atlantis-staging plan and so on
    • When working multiple atlantis servers, atlantis plan handle all servers.
    • To execute a specific server, I want to change the executable name.

discussion

references

@krrrr38 krrrr38 requested a review from a team as a code owner December 16, 2022 03:13
@jamengual jamengual added the feature New functionality/enhancement label Dec 16, 2022
@jamengual
Copy link
Contributor

why is this necessary? can you explain a bit more the workflow?
since you have other PR I want to understand the need for this.

Thanks for the contribution again @krrrr38

@krrrr38
Copy link
Contributor Author

krrrr38 commented Dec 16, 2022

@jamengual Yes. Based on the #2798 (comment), currently we can trigger commands by atlantis plan, run plan and @GithubUser plan.

When we run multiple servers for a single repository, these commands are handled in all servers. In this case, we can consider following workarounds to figure out which servers should run them.

  • use different @GithubUser token by servers.
  • use different repo_config_file and set different base branch
  • use custom workflow to check extra args with COMMENT_ARGS
    • For example, we can use atlantis plan -- -var 'DUMMY=run-on-server1' and parse it.
    • CONS: it's a dirty hack.
  • use different execution name
    • To process or not on each server, we can use different execution name by this PR feature.

In my case, I will run multiple servers which use the same base branches (for dev1 env and dev2 env with main branch). At that time, when I run atlantis apply command in one environment, I need this feature. (Putting I should run one atlantis server aside...)

It's possible to solve my problem by adding@GithubAppSlug support, but I think this feature is the most easiest way to handle it.

@jamengual
Copy link
Contributor

Thanks @krrrr38 for the contribution!!!

@jamengual jamengual merged commit 8d74878 into runatlantis:main Dec 17, 2022
@nitrocode
Copy link
Member

Thank you @krrrr38 ! All your work is very much appreciated. You have high quality PRs!

@krrrr38 krrrr38 deleted the feat-customize-executable-name branch December 17, 2022 04:32
@nitrocode nitrocode added this to the 0.22.0 milestone Dec 23, 2022
@nitrocode nitrocode changed the title feat: customize vcs comment command executable name feat: customize vcs comment command --executable-name Jan 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality/enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Custom Wake Word
3 participants